package com.zs.blog.converter;

import com.zs.blog.model.dto.UserListDTO;
import com.zs.blog.model.entity.User;
import com.zs.blog.model.vo.UserDetailVO;
import com.zs.blog.model.vo.UserListVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Title: UserConverter
 * @Author zs
 * @Package com.zs.blog.converter
 * @Date 2025/5/18 16:21
 * @description: 用户数据映射器
 */
@Mapper(componentModel = "Spring")
public interface UserConverter {
    UserConverter INSTANCE = Mappers.getMapper(UserConverter.class);

    List<UserListVO> userList2UserListVO(List<User> userList);

    UserDetailVO user2UserDetailVO(User user);

    UserListVO userListDTO2UserListVO(UserListDTO userListDTO);
}
